import request from "@/utils/request";
const api_url = `/admin/hosp/hospitalSet`;
export default {
  //医院设置列表
  getHospSetList(current, limit, searchObj) {
    return request({
      url: `${api_url}/findPageHospSet/${current}/${limit}`,
      method: "post",
      data: searchObj //json格式
    });
  },
  //删除医院设置
  deleteHospSet(id){
    return request({
        url: `${api_url}/${id}`,
        method: "delete",
      });
  },
  //批量删除
  batchRemove(idList){
    return request({
        url: `${api_url}/batchRemove`,
        method: "delete",
        data:idList
      });
  },
  //锁定和解锁
  lockHospitalSet(id,status){
    return request({
      url: `${api_url}/lockHospitalSet/${id}/${status}`,
      method: "put",
    })
  },
  //添加医院设置
  saveHospitalSet(hospitalSet){
    return request({
      url:`${api_url}/saveHospitalSet`,
      method:"post",
      data:hospitalSet
    })
  },
  //根据id回显
  getHospSet(id){
    return request({
      url:`${api_url}/getHospSet/${id}`,
      method:"get",
    })
  },
  //修改医院设置
  updateHospSet(hospitalSet){
    return request({
      url:`${api_url}/updateHospSet`,
      method:"post",
      data:hospitalSet
    })
  }
}
